package com.xxx.service.impl;

import java.util.List;

import com.xxx.bean.SC_User;
import com.xxx.dao.SC_UserDAO;
import com.xxx.service.SC_UserService;

public class SC_UserServiceImpl implements SC_UserService {

	private SC_UserDAO sc_userDao;
	  
	public SC_UserDAO getSc_userDao() {
		return sc_userDao;
	}

	public void setSc_userDao(SC_UserDAO scUserDao) {
		sc_userDao = scUserDao;
	}

	public void delete(SC_User user) throws Exception{
		sc_userDao.delete(user);
	}

	public void save(SC_User user) throws Exception{
		sc_userDao.save(user);

	}

	public void update(SC_User user)throws Exception{
		sc_userDao.update(user);

	}

	public SC_User getByUnoAndPwd(int uno, String upassword) throws Exception {
		if(upassword.trim().equals("")||upassword==null){
			
			return null;
		}
		return sc_userDao.getByUnoAndPwd(uno, upassword);
	}

	public List<SC_User> findAll() throws Exception {
	
		return sc_userDao.findAll();
	}

	public SC_User findByUno(int uno) throws Exception {
		
		return sc_userDao.findByUno(uno);
	}

}
